package com.json.jsonobject;

import com.curve.UserCurve;
import com.curve.linechart.DayEntity;
import com.util.CurveDateUtil;

import java.util.Date;

/**
 * User: lyj
 * Date: 2011-12-29
 * Time: 12:42:16
 */
public class JsonTransition {
     public static CurveObj changeUserCurve2CurveObj(UserCurve userCurve) {
        CurveObj curveobj=new CurveObj();
        curveobj.setCreateDate(userCurve.getCreateDate().getTime());
        curveobj.setCreatedateStr(CurveDateUtil.sdf.format(userCurve.getCreateDate()));
        curveobj.setTitle(userCurve.getTitle());
        curveobj.setSysId(userCurve.getSysId());
        return curveobj;
    }
     public static PointObj changeDayEntity2PointObj(DayEntity dayentity, Date startDate) {
        PointObj obj=new PointObj(startDate.getTime(),dayentity.getDay().getTime(),(float)dayentity.getNum());

        return obj;
    }
}
